package com.culture.bootdemo.designPattern设计模式.responsibilityChain责任链;

import com.culture.bootdemo.common.basevo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wen
 * @DateTime: 2023/8/24 14:36
 * @Description:
 **/
@RestController
@Slf4j
@RequestMapping("/testResponChain")
public class TestResponChainController {

    @Autowired
    private HandleChainService handleChainService;

    /**
     * 责任链模式测试
     *
     * @return
     */
    @GetMapping("test")
    public Result<Object> test() {
        handleChainService.execute(new OrderVO());
        return Result.builder().data(1).build();
    }
}
